home *** CD-ROM | disk | FTP | other *** search
-
- Resource tracking demo programs
- -------------------------------
-
-
- In this dir you will find two demo programs that shows the resource tracking
- capabillities of the dignet.library. We included the sources so you can see
- what they do wrong (note: the errors are intended to show what happends).
-
-
- DignetNoFree
- ------------
-
- USAGE:
-
- DignetNoFree <device> <unit>
-
- This program allocates a dignet net structure, but it exits immediatly
- without freeing it.
-
- Now: Try to open the device again with f.ex. DignetTERM.
- You can't since the device is in use.
-
- So: use the DignetLIST program to show information about the nets in use.
-
- Then: use the DignetKILL <no.> to remove the Dignet demo task.
-
- You can now try to use the DignetTERM program again.
- you will get a successful open and the memory the demo program left is freed
- together with the device closing, port freeing etc.
-
-
-
- DignetFreeTwice
- ---------------
-
- USAGE:
-
- DignetFreeTwice <device> <unit>
-
- This program shows what happens if you try to free a net sturcture twice (or
- muliple of times for that matter). It checks the result of FreeNet() and if
- it is not null you have tried to free it after it became invalid which the
- program stated.
-
-
- Other tests
- -----------
-
- Use the DignetNoFree again. Then flush the libraries in the system. You will
- get a requester that warns you about the programs using the dignet. Before
- you press OK you can use the DignetLIST and DignetKILL to remove the
- leftover structures. Press OK and everything is ok.
-
-